#include <iostream>
#include <boost/format.hpp>

#include <windows.h>

#include "CommonSDK.h"
#include "TestTask.h"

using namespace fm;
using namespace std;

#define MyPrint(str) cout<<str<<endl;

int main()
{

	ThreadPoolPtr threadPool = CreateThreadPool(5);
	Sleep(2000);

	threadPool->AdjustThreadNum(1);

	for (int i = 0; i < 10; i++)
	{
		ThreadTaskPtr task(new TestTask(i));
		threadPool->PushTask(task);
	}

	threadPool->Terminate();
	threadPool->Join();


	int a = StringUtil::ConvertStringToInt("11");

	std::string str;

	str = boost::str(boost::format("adsda %d %d") %1 %2);
	cout<<str<<endl;

	std::string aaa = "aBc";
	std::string aaa1 = "abc";
	std::string aaa2 = "aBc";

	bool rr = StringUtil::IsEqual(aaa, aaa1);
	bool rr1 = StringUtil::IsEqual(aaa1,aaa2,false);
	bool rr2 = StringUtil::IsEqual(aaa,aaa2);

	StringUtil::MakeLower(aaa);
	MyPrint(aaa);
	StringUtil::MakeUpper(aaa);
	MyPrint(aaa);


	cout<<a<<endl;
	return 0;
}